import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

import HomeContainer from '@/components/tabbar/HomeContainer'
import MemberContainer from '@/components/tabbar/MemberContainer'
import CarContainer from '@/components/tabbar/CarContainer'
import SearchContainer from '@/components/tabbar/SearchContainer'
import NewsList from '@/components/news/NewsList'
import NewsInfo from '@/components/news/NewsInfo'

Vue.use(Router)

export default new Router({
	routes: [
		//配置路由规则
		{
			path: '/',
			redirect: '/home'
		},
		{
			path: '/home',
			component: HomeContainer
		},
		{
			path: '/home/newslist',
			component: NewsList
		},
		{
			path: '/home/newsinfo/:id',
			component: NewsInfo
		},
		{
			path: '/member',
			component: MemberContainer
		},
		{
			path: '/car',
			component: CarContainer
		},
		{
			path: '/search',
			component: SearchContainer
		}
	],
	//在路由设置高亮
	linkActiveClass: 'mui-active' //覆盖默认高亮的路由的类，默认的类是router-link-active
})